package com.hushi.test;

import com.hushi.service.CustomerService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Demo2 {

    @Test
    public void test1(){
        //1.初始化SpringIOC容器
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
        //2.从IOC容器取出对象
        CustomerService customerService = (CustomerService)ac.getBean("CustomerService");
        System.out.println(customerService);


    }
}
